package cn.tgq.environment.a_quickstart.bean;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.env.Environment;
import org.springframework.stereotype.Component;

@Component
public class EnvironmentHolder {

    private final Environment environment;

    @Autowired
    public EnvironmentHolder(Environment environment) {
        this.environment = environment;
    }

    public void printEnvironment() {
        System.out.println(environment);
    }
}
